package nxu.it.service;

import com.mysql.cj.jdbc.MysqlDataSource;
import org.jdbi.v3.core.Jdbi;

import javax.sql.DataSource;

/**
 * @author yangliu
 * @project jfinal-app-1
 * @sid 12020243892
 * @date 2022/12/5 - 20:35
 */
public class DbHelper {
    public static final DataSource DATA_SOURCE;
    public  static final Jdbi JDBI;

    static {
        MysqlDataSource mysqlDataSource = new MysqlDataSource();
        mysqlDataSource.setUrl("jdbc:mysql://localhost:3306/blog");
        mysqlDataSource.setUser("root");
        mysqlDataSource.setPassword("123456");
        DATA_SOURCE = mysqlDataSource;
        JDBI = Jdbi.create(mysqlDataSource);
    }


}
